dst=httpServer
src=main.cc
cc=g++
Depends=-std=c++11 -lpthread
cwd=$(shell pwd)
cgi=test.exe

.PHONY:ALL
ALL:$(dst) $(cgi) output
$(dst):$(src)
	$(cc) -o $@ $^ $(Depends)

$(cgi):$(cwd)/cgi/cgiTest.cc
	$(cc) -o $@ $^ $(Depends)

.PHONY:clean
clean:
	rm -f $(dst)
	rm -rf output
.PHONY:output
output:
	mkdir -p output
	cp $(dst) output
	cp -rf WebRoot output
	cp $(cgi) output/WebRoot
